<template>
  <!--行内编辑。全来-->
  <div class="el-descriptions el-descriptions--small">
    <div class="el-descriptions__body">
      <table class="el-descriptions__table is-bordered">
        <tbody>
          <!--th-->
          <tr>
            <th
              class="el-descriptions__cell el-descriptions__label is-bordered-label is-vertical-label"
              v-for="(ctlId, index) in formMeta.colOrder"
              :key="index"
            >
              {{ childPropsList[ctlId].meta.label }} ({{ childPropsList[ctlId].meta.colName }})
            </th>
          </tr>
          <!--td-->
          <edit-tr
            v-for="(ctlId, index) in formMeta.colOrder"
            :key="index"
            :colOrder="formMeta.colOrder"
            :model="model[ctlId]"
            :childProps="childPropsList"
          ></edit-tr>
        </tbody>
      </table>
    </div>
  </div> 
</template>


<script setup lang="ts"  generic="T extends object">
  import { reactive } from 'vue'
  import type { IFromProps } from '../map'

  // 引入编辑行
  import editTr from './grid-edit-tr.vue'

  const props = defineProps<IFromProps<T>>()

  console.log('props===grid-edit', props)
  
</script>